<%@ page contentType="text/html; charset=UTF-8"%>
<script type="text/javascript">
var errors = {}
var successMsg = ""
<spring:hasBindErrors name="form">
<c:choose>
	<c:when test="${not empty errors.fieldErrors }">
	<c:forEach var="error" items="${errors.fieldErrors}">
	errors["${error.field }"]= "${error.defaultMessage }"
	</c:forEach>
	</c:when>
</c:choose>
</spring:hasBindErrors>

<c:choose>
<c:when test="${not empty okmessage}">
successMsg = "${okmessage}"
</c:when>
</c:choose>
</script>
